﻿using PBO.Network;
using PBO.Network.Domain;
using PBO.Network.Enumerations;
using PokemonBattle.BattleRoom.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PBO.RoomClient
{
    internal interface IRoomClient
    {
        #region event

        event Action<User> OnUpdateUserInfo;
        event Action<User> OnAddUserInfo;
        event Action<int> OnRemoveUserInfo;
        event Action<IEnumerable<User>> OnUpdateUserList;

        event Action OnKicked;
        event Action<User> OnLogoned;
        event Action<RoomBattleSetting> OnSetting;
        event Action<string> OnLogonFailed;
        event Action<string> OnReceiveBroadcast;

        event Action<int, string> OnReceiveChat;
        event Action<ChallengeForm> OnReceiveChallenge;

        event Action<int, byte, BattleMode> OnStartAgentBattle;
        event Action<string, BattleMode> OnStartDirectBattle;
        event Action<ObserveInfo> OnObserveBattle;

        event Action<int> OnStart4PHost;
        event Action<int, string> OnAdd4PRoom;
        event Action<int> OnRemove4PRoom;
        event Action<int, byte> OnUpdate4PRoom;
        event Action<IEnumerable<FourPlayerRoom>> OnAdd4PRoomList;

        event Action<BattleMode, BattleRule[]> OnBuildBattleServer;

        #endregion

        void Broadcast(string message);

        void RoomCommand(string message);

        void UpdateInfo();

        ChallengeForm GetChallengeForm(int target);

        void StartFourPlayerBattle(int identity, byte position);

        void ObserveBattle(int target);

        void RegistFourPlayer();

        User GetUser(int identity);

    }
}
